package yesjava;

import java.util.Scanner;

public class ScannerDemo {
    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);
        System.out.println("请输入内容");
//        String next = sca.next(); // 获取字符串，以空白作为结束依据，空格、制表符，回车
/*        String next = sca.nextLine(); // 获取字符串，以回车作为结束依据
        System.out.println(next + 1);*/

      /*  int i = sca.nextInt();
        System.out.println(i);*/
       /* double v = sca.nextDouble();
        System.out.println(v+1);*/
      /*  boolean b = sca.nextBoolean();
        System.out.println(b);*/
//       char c = sca.next().charAt(0);

        /**
         * 演示一个坑！
         */
      /*  System.out.println("请输入年龄");
        String ageStr = sca.nextLine();
        int age = Integer.parseInt(ageStr); // "85" ---> 85

        System.out.println("请输入姓名");
        String name = sca.nextLine(); // ""
        System.out.println("姓名:" +name+ "，年龄:" +age);*/

    }
}
